/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.Date;

/**
 *
 * @author khanhanh
 */
public class CarInCart {

    private int carID;
    private String carName;
    private int quantity = 1;
    private float price;
    private String carImg;
    private boolean driver;
    private Date pickUp = new Date();
    private Date dropOff = new Date();
    private float totalPerCar;

    public CarInCart() {
    }

    public CarInCart(int carID, String carName, int quantity, float price, String carImg, boolean driver, Date pickUp, Date dropOff,float totalPerCar) {
        this.carID = carID;
        this.carName = carName;
        this.quantity = quantity;
        this.price = price;
        this.carImg = carImg;
        this.driver = driver;
        this.pickUp = pickUp;
        this.dropOff = dropOff;
        this.totalPerCar = totalPerCar;
    }

    public int getCarID() {
        return carID;
    }

    public void setCarID(int carID) {
        this.carID = carID;
    }

    public String getCarImg() {
        return carImg;
    }

    public void setCarImg(String carImg) {
        this.carImg = carImg;
    }

    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    public boolean isDriver() {
        return driver;
    }

    public void setDriver(boolean driver) {
        this.driver = driver;
    }

    public Date getDropOff() {
        return dropOff;
    }

    public void setDropOff(Date dropOff) {
        this.dropOff = dropOff;
    }

    public Date getPickUp() {
        return pickUp;
    }

    public void setPickUp(Date pickUp) {
        this.pickUp = pickUp;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        if (quantity < 1) {
            this.quantity = 1;
        } else {
            this.quantity = quantity;
        }
    }

    public float getTotalPerCar() {
        return totalPerCar;
    }

    public void setTotalPerCar(float totalPerCar) {
        this.totalPerCar = totalPerCar;
    }
}
